window.onload = function () {
    var ls = document.getElementById('tab').querySelectorAll('div');
    var db = document.querySelectorAll('.dibu2')
    // console.log(db);
    // console.log(ls);
    for (var i = 0; i < ls.length; i++) {
        ls[i].setAttribute('index', i);
        ls[i].onmouseenter = function () {
            for (var i = 0; i < ls.length; i++) {
                ls[i].className = ''
            }
            this.className = 'jingxuan dise'
            var index = this.getAttribute('index')
            // console.log(index);
            for (var i = 0; i < db.length; i++) {
                db[i].style.display = 'none'
            }
            db[index].style.display = 'block'
        }
    }
}